<?php
	/**
	* Bill Manager
	* @author: trungdt
	* @since: Oct 22, 2011
	* @version: 1.0
	* 
	*  
	* Change logs
	*/
	if (!defined('EXPONENT')) exit('');

	$have_permission=false;
	if (exponent_users_isAdmin() || exponent_permissions_check(array('administrate', "bill_management"),$loc))
		$have_permission=true;

	if (exponent_users_isLoggedIn())
	{
		$lang=exponent_lang_loadFile("modules/productsmodule/views/_Bill_Management.php");
		// build array for javascript lang
		$template=new template("productsmodule","_Bill_Management",$loc);
		$template->register_permissions(array('administrate',"bill_management"),$loc);
        $template->assign("lang", $lang);
		$template->assign("have_permission", $have_permission?1:0);
		$template->output();
		_ab_theme_action_register_title($lang['bill_manager_title']);
	}
	else
	{
		header("Location: ".exponent_core_makeLink(array("module"=>"loginmodule","action"=>"loginredirect")));
	}
?>
